package top.mcwebsite.playandroid.business.tutorial.impl.vm

import androidx.paging.PagingData
import kotlinx.coroutines.flow.Flow
import top.mcwebsite.playandroid.business.articles.api.model.ArticleModel
import top.mcwebsite.playandroid.business.tutorial.api.model.TutorialModel
import top.mcwebsite.playandroid.lib.mvi.base.IIntent
import top.mcwebsite.playandroid.lib.mvi.base.IUiEffect
import top.mcwebsite.playandroid.lib.mvi.base.IUiState

data class TutorialMenuUiState(
    val tutorialModel: TutorialModel? = null,
    val pagerFlow: Flow<PagingData<ArticleModel>>? = null,
) : IUiState

sealed interface TutorialMenuIntent : IIntent {
    class InitTutorialMenuIntent(val tutorialModel: TutorialModel?): TutorialMenuIntent
    class RequestToTutorialDetailPageIntent(val articleModel: ArticleModel): TutorialMenuIntent
}

sealed interface TutorialMenuUiEffect : IUiEffect {
    class NavigationToDetailPageEffect(val articleModel: ArticleModel) : TutorialMenuUiEffect
}